﻿using System;
using System.Globalization;

class DateUtilities
{
    public static void GetDateFromString(string input)
    {
        string[] formats = { "dd.mm.yyyy", "dd/mm/yyyy", "dd.mm.yy", "dd/mm/yy", };
        DateTime dateValue;
        if (DateTime.TryParseExact(input, formats,
                                   new CultureInfo("en-US"),
                                   DateTimeStyles.None,
                                   out dateValue))
        {
            Console.WriteLine("Converted '{0}' to {1:'day'=dd,'month'=mm,'year'=yyyy}.", input, dateValue);
        }
        else
        {
            Console.WriteLine("Unable to convert '{0}' to a date.", input);
        }

    }
}

